﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Celeriq.Common
{
	[DataContract]
	[Serializable]
	[KnownType(typeof(GeoCode))]
	[KnownType(typeof(GeoCodeFieldFilter))]
	public class DimensionDefinition : FieldDefinition
	{
		public const int DGROUP = 1000000; // Dimension groups are by 1 Million
		public const int DVALUEGROUP = DGROUP * 10; // Dimension groups are by 10 Million

		public DimensionDefinition()
			: base()
		{
		}

		[DataMember]
		public override bool IsPrimaryKey
		{
			get { return false; }
			set { ; }
		}

		[DataMember]
		public virtual int DIdx { get; set; }

		[DataMember]
		public virtual RepositoryDefinition.DimensionTypeConstants DimensionType { get; set; }

		[DataMember]
		public virtual long? NumericBreak { get; set; }

		[DataMember]
		public string Parent { get; set; }

		[DataMember]
		public override RepositoryDefinition.FieldTypeConstants FieldType
		{
			get { return RepositoryDefinition.FieldTypeConstants.Dimension; }
			set { ;}
		}

	}
}